package com.xcmg.manage.feign;

import com.xcmg.manage.entity.Staff;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "employee-service",path = "/employee",fallback = EmployeeFeignServiceFallback.class)
public interface EmployeeFeignService {


    @RequestMapping("/getStaff/{id}")
    Staff getStaff(@PathVariable("id") int id);

    @RequestMapping("/addStaff")
    int addStaff();

    @RequestMapping("/deleteStaff/{id}")
    void deleteStaffById(@PathVariable("id") int id);

    @RequestMapping("/update")
    void updateStaffById(@RequestBody Staff staff);

    @RequestMapping("/testSentinel")
    String testSentinel();

}
